import { ref } from 'vue';
import { defineStore } from 'pinia';
import { EventInput } from '@fullcalendar/core';

const useTestCalendarStore = defineStore('testCalendar', () => {
  // 事件数组
  const events = ref<EventInput[]>([]);
  // 控制抽屉显示与隐藏
  const drawerIsShow = ref(false);
  // 添加事件
  const addEvent = (event: EventInput) => {
    events.value.push(event);
  };
  return {
    events,
    drawerIsShow,
    addEvent,
  };
});
export default useTestCalendarStore;
